package com.example.yuejianapp14.Activity.Servics;

import com.example.yuejianapp14.Activity.JavaBean.Success;
import com.example.yuejianapp14.Activity.JavaBean.User;

import okhttp3.MultipartBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Query;

/**
 * Created by jason_lin on 2017/9/28.
 */

public interface UserService {
    @GET("checkID")
    Call<User> Login(
            @Query("uphone")String uphone,
            @Query("upassword")String upassword
    );


    @Multipart
    @POST("upuser")
    Call<String> register(
            @Query("uphone")String uphone,
            @Query("upassword")String upassword,
            @Query("uname")String uname,
            @Query("uaddress")String uaddress,
            @Query("uintro")String uintro,
            @Part MultipartBody.Part file

    );
    @GET("findUserinfo")
    Call<User> findUserinfo(
            @Query("uid")String uid
    );
    @GET("update")
    Call<Success> updateUserinfo(
            @Query("uid")String uid,
            @Query("uname")String uname,
            @Query("uphone")String uphone,
            @Query("upassword")String upassword,
            @Query("uaddress")String uaddress,
            @Query("uintro")String uintro
    );
}
